﻿using System;
using System.Collections.Generic;

namespace YJKArch.AreaStatistical.Statistical
{
	public class ArchAreaStatisticalRowData
	{
		public ArchAreaStatisticalRowData(ArchAreaStatisticalRowData rhs)
		{
			this.m_HoomNumbName = rhs.m_HoomNumbName;
			this.m_SuiteNumbName = rhs.m_SuiteNumbName;
			this.m_SuiteName = rhs.m_SuiteName;
			this.m_SuiteUseArea = rhs.m_SuiteUseArea;
			this.m_WallArea = rhs.m_WallArea;
			this.m_BalconyArea = rhs.m_BalconyArea;
			this.m_SuiteArchArea = rhs.m_SuiteArchArea;
			this.m_PublicArea = rhs.m_PublicArea;
			this.m_ArchArea = rhs.m_ArchArea;
		}

		public ArchAreaStatisticalRowData(string hoomNumbName, string suiteNumbName, string suiteName, double suiteUseArea, double wallArea, double balconyArea, double suiteArchArea, double publicArea, double archArea)
		{
			this.m_HoomNumbName = hoomNumbName;
			this.m_SuiteNumbName = suiteNumbName;
			this.m_SuiteName = suiteName;
			this.m_SuiteUseArea = suiteUseArea.ToString("f2");
			this.m_WallArea = wallArea.ToString("f2");
			this.m_BalconyArea = balconyArea.ToString("f2");
			this.m_SuiteArchArea = suiteArchArea.ToString("f2");
			this.m_PublicArea = publicArea.ToString("f2");
			this.m_ArchArea = archArea.ToString("f2");
		}

		public List<string> ToStrList()
		{
			return new List<string>
			{
				this.m_HoomNumbName,
				this.m_SuiteNumbName,
				this.m_SuiteName,
				this.m_SuiteUseArea,
				this.m_WallArea,
				this.m_BalconyArea,
				this.m_SuiteArchArea,
				this.m_PublicArea,
				this.m_ArchArea
			};
		}

		public void ToGridCellList(int colIndex, ref int startRowIndex, ref List<CellInfo> cells)
		{
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_HoomNumbName));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_SuiteNumbName));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_SuiteName));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_SuiteUseArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_WallArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_BalconyArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_SuiteArchArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_PublicArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_ArchArea));
			startRowIndex++;
		}

		public string m_HoomNumbName;

		public string m_SuiteNumbName;

		public string m_SuiteName;

		public string m_SuiteUseArea;

		public string m_WallArea;

		public string m_BalconyArea;

		public string m_SuiteArchArea;

		public string m_PublicArea;

		public string m_ArchArea;
	}
}
